import { AbsDisPtSvc } from "../absdisptsvc";
import common from "../../../common/common";
import {CoordTRFUtil} from "../../../common/tools/coordtool";

class DisCenterPtSvc extends AbsDisPtSvc {
    constructor() {
        super();
        this.desc = "圆心";
    }
    subDisplay(aborbPtInfo, map, mapInfo) {
        let radius = this.auxMarkSize / mapInfo.getScaling();
        let sp = CoordTRFUtil.world2Screen(aborbPtInfo.pt, mapInfo);
        map.beginPath();
        map.ellipse(sp.x, sp.y, radius, radius, 0, 0, Math.PI * 2, false);
        map.closePath();
        map.strokeStyle = aborbPtInfo.color.toHexString();
        map.stroke();
    }
}

export { DisCenterPtSvc }